package com.yh.csx.event.common.utils;

import java.util.Calendar;
import java.util.Date;

/**
 * @author zhangsheng
 * @date 2021/9/10 17:37
 */
public class DateHelper {
    public static Date getDateStart(Date date) {
        Calendar cale = Calendar.getInstance();
        cale.setTime(date);
        cale.set(cale.get(Calendar.YEAR), cale.get(Calendar.MONTH), cale.get(Calendar.DATE), 0, 0, 0);
        final int last = cale.getActualMinimum(Calendar.DAY_OF_MONTH);
        cale.set(Calendar.DAY_OF_MONTH, last);
        return cale.getTime();
    }

}
